package thread;

import java.util.Collections;
import java.util.List;
import java.util.concurrent.CountDownLatch;

public class QuickSortHandler implements Runnable {
    private CountDownLatch threadsSignal;
    public List<Integer> nums;

    public QuickSortHandler(List<Integer> nums, CountDownLatch threadsSignal) {
        this.nums = nums;
        this.threadsSignal = threadsSignal;
    }

    public void run() {
        Collections.sort(nums);
        threadsSignal.countDown();
    }
}
